package my.graphicstest;

import android.os.Bundle;
import android.os.Environment;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Point;
import android.util.Log;
import android.view.Menu;
import android.widget.ImageView;
import android.widget.TextView;

public class Graphics extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_graphics);
		//TextView textview = (TextView)findViewById(R.id.text);
		ImageView imageview = (ImageView)findViewById(R.id.image);
		String path = Environment.getExternalStorageDirectory().getPath() + "/DCIM/Camera/1.jpg";
		//String text = new String();
		loadBitmap(path,imageview);
		
	
		
		
	}
	
	public void loadBitmap(String path,ImageView view){
		BitmapWorkerTask task = new BitmapWorkerTask(view);
		task.execute(path);
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.graphics, menu);
		return true;
	}
	
	
}
